<template>
  <div class="app-container">
    <div class="table_container">
      <el-tabs
        v-model="messageTemplateActive"
        @tab-click="messageTemplateTabsClick"
      >
        <el-tab-pane
          label="短信模版设置"
          name="1"
        >
          <div class="search_box">
            <el-row :gutter="20">
              <el-col :md="8">
                <el-input
                  v-model="searchInpt"
                  placeholder="输入ID/昵称/手机号"
                  clearable
                ></el-input>
              </el-col>
              <el-col :md="4">
                <el-button
                  type="primary"
                  @click="searchFeedbackData()"
                  icon="el-icon-search"
                  :loading="searchLoading"
                  plain
                >搜索</el-button>
              </el-col>
              <el-col :md="4">
              </el-col>
              <el-col :md="8">
              </el-col>
            </el-row>
          </div>
          <el-table
            border
            v-loading="tableloading"
            :data="messageTemplateData"
            highlight-current-row
            style="width: 100%"
          >
            <el-table-column
              property="index"
              label="id"
              align="center"
              fixed
            >
            </el-table-column>
            <el-table-column
              property="templateName"
              label="模版名称"
              align="center"
              fixed
            >
            </el-table-column>
            <el-table-column
              property="templateContext"
              label="模版内容"
              align="center"
            >
            </el-table-column>
            <el-table-column
              label="详情"
              align="center"
            >
              <template slot-scope="scope">
                <el-button
                  @click="goGraph(scope.row)"
                  type="text"
                  size="small"
                >查看</el-button>
              </template>
            </el-table-column>
            <el-table-column
              label="操作"
              align="center"
            >
              <template slot-scope="scope">
                <el-button
                  @click="goGraph(scope.row)"
                  type="text"
                  size="small"
                >设为默认</el-button>
              </template>
            </el-table-column>
          </el-table>
        </el-tab-pane>
        <el-tab-pane
          label="APP通知模版设置"
          name="2"
        >
          <div class="search_box">
            <el-row :gutter="20">
              <el-col :md="4">
                <el-input
                  v-model="searchInpt"
                  placeholder="输入ID/昵称/手机号"
                  clearable
                ></el-input>
              </el-col>
              <el-col :md="6">
                <el-button
                  type="primary"
                  @click="searchFeedbackData()"
                  icon="el-icon-search"
                  :loading="searchLoading"
                  plain
                >搜索</el-button>
              </el-col>
              <el-col :md="6">
              </el-col>
              <el-col :md="8">
              </el-col>
            </el-row>
          </div>
          <el-table
            v-loading="tableloading"
            :data="messageTemplateData"
            highlight-current-row
            style="width: 100%"
          >
            <el-table-column
              property="index"
              label="id"
              align="center"
              fixed
            >
            </el-table-column>
            <el-table-column
              property="templateName"
              label="模版名称"
              align="center"
              fixed
            >
            </el-table-column>
            <el-table-column
              property="templateContext"
              label="模版内容"
              align="center"
            >
            </el-table-column>
            <el-table-column
              label="详情"
              align="center"
            >
              <template slot-scope="scope">
                <el-button
                  @click="goGraph(scope.row)"
                  type="text"
                  size="small"
                >查看</el-button>
              </template>
            </el-table-column>
            <el-table-column
              label="操作"
              align="center"
            >
              <template slot-scope="scope">
                <el-button
                  @click="goGraph(scope.row)"
                  type="text"
                  size="small"
                >设为默认</el-button>
              </template>
            </el-table-column>
          </el-table>
        </el-tab-pane>
      </el-tabs>
    </div>

  </div>
</template>

<script>
import {} from "@/api/other";
import { formatDateTime } from "@/utils/common";
export default {
  data() {
    return {
      count: 0,
      limit: 20,
      currentPage: 1,
      tableloading: false,
      searchInpt: "",
      searchLoading: false,
      messageTemplateData: [],
      PushTemplateData: [],
      messageTemplateActive: "1"
    };
  },
  created() {},
  render: {},
  methods: {
    messageTemplateTabsClick() {}
  }
};
</script>

<style lang="less">
.search-box {
  padding: 20px 0;
}
.sendMagin {
  width: 400px;
  margin: 0 auto;
}
.last {
  text-align: right;
}
</style>
